<?php

namespace App\Modules\Admin\Entities\Expenses;

use App\Models\Model;
use App\Modules\Admin\Entities\Water\CommunityModel;
use App\Modules\Admin\Entities\Water\WaterDeviceModel;

class PropertyLogModel extends Model
{
    protected $table='water_device_property_log';
    protected $primaryKey='property_id';

    public function site_info(){
        return $this->hasOne(MasterModel::class,'site_id','site_id');
    }
    public function community_info(){
        return $this->hasOne(CommunityModel::class,'id','community_id')->select(['id','title']);
    }
    public function water_device_info(){
        return $this->hasOne(WaterDeviceModel::class,'water_id','water_id')->select(['water_id','water_title']);
    }
}
